package com.jeasonzhao.report.engine.servlet.param;

import com.jeasonzhao.commons.utils.Guid;
import com.jeasonzhao.report.engine.servlet.Constants;
import com.jeasonzhao.report.model.ReportParam;

public abstract class AbstractSelector
{
    private ReportParam parameter = null;
//    private JSONClass selectorMode = null;
//    private static final String CSS_Title = "";
    public AbstractSelector(ReportParam param)
    {
        this.parameter = param;
    }

    protected String getTitle(String str)
    {
        return "<span>" + str + "</span>";
    }

    protected ReportParam getParameter()
    {
        return this.parameter;
    }

    protected String getControlName()
    {
        return Constants.getParameterContolName(null == this.parameter
                                                ? Guid.newGuid()
                                                : this.parameter.getParam());
    }

    protected void initFromString(String configuration)
    {

    }
}
